package vn.raz.brainnydefense.ultility;

import vn.raz.bmspriter.BMSRenderObjectProducer;
import vn.raz.bmspriter.BMSSCMLFile;
import vn.raz.bmspriter.BMSSCMLFileLoader;
import vn.raz.bmspriter.libgdxrenderer.BMSLibgdxROP_TextureAtlas;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.TextureRegion;

public class Assets {
	public static BMSSCMLFileLoader loader;
	
	public static TextureAtlas zombie_atlas;
	public static BMSSCMLFile zombie_scml;
	public static BMSRenderObjectProducer zombie_producer;
	
	public static TextureRegion[] jewel;
	public static TextureRegion line;
	public static TextureRegion table;
	public static TextureRegion bg;
	public static TextureRegion pea_bullet;
	public static TextureRegion peashooter;
	
	public static BitmapFont fontDamage;
	
	public static void load(){
		loader = new BMSSCMLFileLoader();
		
		zombie_atlas = new TextureAtlas( Gdx.files.internal("Images/zombie.pack"));
		zombie_scml = loader.loadSCML(Gdx.files.internal("Images/zombie.scml"));
		zombie_producer = new BMSLibgdxROP_TextureAtlas(zombie_atlas);
		
		jewel = new TextureRegion[4];
		for(int i=0;i<4;i++){
			jewel[i] = new TextureRegion(new Texture(Gdx.files.internal("Images/jewel"+(i+1)+".png")));
		}
		line = new TextureRegion(new Texture(Gdx.files.internal("Images/line.png")));
		table = new TextureRegion(new Texture(Gdx.files.internal("Images/table.png")));
		bg = new TextureRegion(new Texture(Gdx.files.internal("Images/bg.png")));
		peashooter = new TextureRegion(new Texture(Gdx.files.internal("Images/peashooter.png")));
		pea_bullet = new TextureRegion(new Texture(Gdx.files.internal("Images/pea-bullet.png")));
		
		fontDamage = new BitmapFont(Gdx.files.internal("Fonts/font-damage.fnt"), Gdx.files.internal("Fonts/font-damage.png"), false);
	}
}
